<?php
	class nguoidungbs
	{
		public $MaNguoiDung = 0;
		public $TenNguoiDung = "";
		public $TenDangNhap = "";
		public $MatKhau = "";
		public $DiaChi = "";
		public $Email = "";
		public $DienThoai = "";
		public $QuyenHan = 2;
		public $Khoa = 0;
		public $HinhAnh = "";
		public function Add()
		{
			$db = new nguoidungdb();
			return $db->Add($this->TenNguoiDung, $this->TenDangNhap, $this->MatKhau, $this->DiaChi, $this->Email, $this->DienThoai, $this->QuyenHan, $this->Khoa);
		}
		
		public function Delete()
		{
			$db = new nguoidungdb();
			return $db->Delete($this->MaNguoiDung);
		}
		
		public function Update()
		{
			$db = new nguoidungdb();
			return $db->Update($this->MaNguoiDung, $this->TenNguoiDung, $this->DiaChi, $this->Email, $this->DienThoai, $this->QuyenHan, $this->Khoa);
		}
		public function Update_Img()
		{
			$db = new nguoidungdb();
			return $db->Update_Img($this->MaNguoiDung, $this->HinhAnh);
		}
		
		public function GetList()
		{
			$db = new nguoidungdb();
			return $db->GetList($this->MaNguoiDung, $this->TenNguoiDung, $this->TenDangNhap, $this->MatKhau, $this->DiaChi, $this->Email, $this->DienThoai);
		}
		
		public function ChangePass()
		{
			$db = new nguoidungdb();
			return $db->ChangePass($this->MaNguoiDung, $this->MatKhau);
		}
		
		public function Active()
		{
			$db = new nguoidungdb();
			return $db->Active($this->MaNguoiDung, $this->QuyenHan, $this->Khoa);
		}
	}
?>